-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dataModelName parameter to GetModelMetadata endpoint #12826
Conversation
…2741-update-endpoint-fetching-datamodel
…thub.com/Altinn/altinn-studio into 12741-update-endpoint-fetching-datamodel
…DataTypeId_Is_NonExisting
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #12826 +/- ##
=======================================
Coverage 90.65% 90.66%
=======================================
Files 1361 1361
Lines 19426 19426
Branches 2371 2371
=======================================
+ Hits 17611 17612 +1
+ Misses 1553 1552 -1
Partials 262 262 ☔ View full report in Codecov by Sentry. |
…thub.com/Altinn/altinn-studio into 12741-update-endpoint-fetching-datamodel
…thub.com/Altinn/altinn-studio into 12741-update-endpoint-fetching-datamodel
…thub.com/Altinn/altinn-studio into 12741-update-endpoint-fetching-datamodel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
I have tested and everything still works as before 🌟
However, I got a few comments that will imply in all the similar scenarios. Nothing bug, but mostly for having consistent code 🤗
backend/src/Designer/Services/Implementation/AppDevelopmentService.cs
Outdated
Show resolved
Hide resolved
backend/src/Designer/Services/Interfaces/IAppDevelopmentService.cs
Outdated
Show resolved
Hide resolved
backend/tests/Designer.Tests/Controllers/AppDevelopmentController/GetModelMetadataTests.cs
Outdated
Show resolved
Hide resolved
backend/tests/Designer.Tests/Controllers/AppDevelopmentController/GetModelMetadataTests.cs
Show resolved
Hide resolved
frontend/packages/ux-editor-v3/src/components/config/EditFormComponent.test.tsx
Outdated
Show resolved
Hide resolved
...ckages/ux-editor/src/components/Properties/PageConfigPanel/HiddenExpressionOnLayout.test.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/components/Properties/PageConfigPanel/PageConfigPanel.test.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/components/config/EditFormComponent.test.tsx
Outdated
Show resolved
Hide resolved
frontend/packages/ux-editor/src/components/config/ExpressionContent/ExpressionContent.test.tsx
Outdated
Show resolved
Hide resolved
…t-data-model' where applicable
backend/src/Designer/Services/Implementation/AppDevelopmentService.cs
Outdated
Show resolved
Hide resolved
backend/tests/Designer.Tests/Controllers/AppDevelopmentController/GetModelMetadataTests.cs
Fixed
Show fixed
Hide fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 🥳
* Make route 'model-metadata' take optional parameter dataModelName * Add tests for dataModelName param * Update path in paths.js * Refactor arrange part of tests into a separate method * Add 'undefined' value for dataModelName where it is used in frontend code * Modify GetModelName method and delete unused code * Add fallback to ApplicationMetadata in GetModelName * Move layoutSetsMocks into a new file
Description
Currently, the
GetModelMetadata
endpoint infers which data model to return based on thelayoutSet
parameter. Now that we will support multiple data models per layout set, we have to be more specific when requesting the data model. Therefore, the optionaldataModelName
parameter has been added in this PR.If there is no
dataModelName
parameter specified in the request, then we are still returning the data model based on thelayoutSet
parameter, ensuring backwards compatibility.Related Issue(s)
Verification
Documentation